package com.example.common.view

import android.content.Context
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.PagerSnapHelper
import androidx.recyclerview.widget.RecyclerView

class SnapPageLayoutManager constructor(context: Context):LinearLayoutManager(context){
    private val mSnapHelper = PagerSnapHelper()
    override fun onAttachedToWindow(view: RecyclerView?) {
        super.onAttachedToWindow(view)
        mSnapHelper.attachToRecyclerView(view)//将RecycleView页面切换交给PagerSnapHelper管理就行
    }



}